﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SnmpForm.SysUser
{
    public class UserConfigItem : APConfig.ApConfigItem
    {
        public UserConfigItem(string text, object value)
            : base(text, value)
        {
        }
    }

    public class SYSUSER_DEFINE_DATA
    {
        static public UserConfigItem[]
            USER_ROLE = { new UserConfigItem("只读", BusinessWrapper.User.UserRole.READ), 
                        new UserConfigItem("普通", BusinessWrapper.User.UserRole.NORMAL), 
                        new UserConfigItem("超级", BusinessWrapper.User.UserRole.SUPER)};
        static public UserConfigItem find(UserConfigItem[] items, object value, out int index)
        {
            index = 0;
            UserConfigItem item = null;
            for (int nIndex = 0; nIndex < items.Length; nIndex++)
            {
                if (items[nIndex].Value.Equals(value))
                {
                    item = items[nIndex];
                    index = nIndex;
                }
            }
            return item;
        }
    }
}
